package com.woniu.controller;


import com.woniu.common.CommonResult;
import com.woniu.pojo.CollectService;
import com.woniu.pojo.Propertypaydto;
import com.woniu.service.ServiceCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.jnlp.IntegrationService;
import java.util.List;

@Controller
@RequestMapping("/collectservice")
public class PayCollectController {

    @Autowired
    private ServiceCollectService serviceCollectService;

    //加载收藏服务列表
    @GetMapping("/selectCollectservice")
    public @ResponseBody CommonResult collectServicelist()
    {
        Integer userid=1;
        try {
            List<Propertypaydto> collects=serviceCollectService.selectCollectService(userid);
            return CommonResult.success(collects);
        } catch (Exception e) {
            e.printStackTrace();
            return  CommonResult.failed("加载失败");
        }
    }




}
